#include "mainwindow.h"
#include <QApplication>
#include <QTranslator>
#include "playerapplication.h"
#include "dialoglogin.h"
#include "appsettings.h"


int main(int argc, char *argv[])
{
    PlayerApplication app(argc, argv);

    QTranslator qtTranslator;
    qtTranslator.load("RoundPlayer.qm");
    app.installTranslator(&qtTranslator);

	MainWindow w;

//#ifndef _DEBUG
#if (1)
    DialogLogin dlg;
	dlg.setDataStore(app.getSecureDataStore());

	if (QDialog::Accepted != dlg.exec())
	{
		return 0;
	}

    QString user = dlg.getUser();
    app.setUser(user);

#endif //

	w.show();

    return app.exec();
}
